package com.rmondjone.face

import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import androidx.viewpager.widget.ViewPager

/**
 * copyright：
 * @author：anthui creation date： .
 * @since: 1.0.0
 * @describe:可以禁止 滑动的ViewPage
 */
class HistoryViewPager(context: Context, attrs: AttributeSet?) : ViewPager(context, attrs) {
    var mEnabled = false

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        return if (this.mEnabled) {
            super.onTouchEvent(event)
        } else false
    }

    override fun onInterceptTouchEvent(event: MotionEvent?): Boolean {
        return if (this.mEnabled) {
            super.onInterceptTouchEvent(event)
        } else false
    }

}